Include is a summary of many PHP files, usually placed in the outermost part of the folder.
Header ("Content-type:text/html;charset=utf-8"); // Set character date_default_timezone_set ("PRC"); // set the time zone for China Session_Start (); /
Include folder analysis in php ,. Include folder analysis in php. include is a summary of many php files. it is usually placed on the outermost layer of the folder .? Phpheader (content-type: texthtml; charsetutf-8); set the word include folder
The include (), require () statement contains and runs the specified file. The two structures are exactly the same on the containing file, and the only difference is the handling of the error. The require () statement stops when it encounters a
PHP replaces include. php with. include. php. Recently, I learned PHP and liked to compare it with. NET. I found that one of the differences is the reference of objects in other files. We know that java has the concept of a package, while. NE has
PHP: use. include. php replaces include. php' recently I have been learning php, and I always like it. NET to compare and find that one of the differences is the reference of objects in other files. We know that java has the concept of a package,
Include () and require () statements include and run the specified file. The two structures are exactly the same on the contained files, and the only difference is the handling of errors. When the require () Statement encounters an error or the
Include () and require () statements include and run the specified file. The two structures are exactly the same on the contained files, and the only difference is the handling of errors. When the require () Statement encounters an error or the
In many cases, the company has one type of code that needs to be deployed uniformly, such as: 1. Database configuration file 2. Unified Framework of the company 3. Other uniform program codefor this part of the code we need to unify the
For example, the following code:
Copy Code code as follows:
Include (' hello.php ');
echo ' include Test final! '; /include the error, but continues execution, showing: include Test final!
Require (' hello.php ');
echo ' Require
Summarize:1. Include or require contains other files used./or. /, the current path and the previous layer path, depending on the path of the script being run, will have the following problem.When you write PHP programs, you often use include or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.